package jpa.entitys.promis.common;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;

import jpa.entitys.common.CommonEntity;


/**
 * The persistent class for the SUPPLIER_MASTER database table.
 * 
 */
@Entity
@Table(name="SUPPLIER_MASTER")
@NamedQueries({
    @NamedQuery(name = "SupplierMaster.findAll", query = " SELECT c FROM SupplierMaster c "),
    @NamedQuery(name = "SupplierMaster.findById", query = " SELECT c FROM SupplierMaster c WHERE c.supplierCode = :Id ")
})
public class SupplierMaster extends CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="SUPPLIER_CODE", unique=true, nullable=false, length=8)
	private String supplierCode;
	
	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}

	@Column(name="ALT_SUPPLIER_ADDRESS", length=300)
	private String altSupplierAddress;

	@Column(name="AMPHUR_CODE", length=2)
	private String amphurCode;

	@Column(length=300)
	private String branch;

	@Column(name="BRANCH_ALTERNATE", length=300)
	private String branchAlternate;

	@Column(name="CITY", length=20)
	private String city;

	@Column(name="CONTACT_PHONE_NO", length=300)
	private String contactPhoneNo;

	@Column(name="CONTRACT_PERSON", length=300)
	private String contractPerson;

	@Column(name="COUNTRY", length=20)
	private String country;

	@Column(name="CREATED_BY")
	private String createdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	@Column(name="CREDIT_DAYS", precision=3)
	private BigDecimal creditDays;

	@Column(length=3)
	private String currency;

	@Column(name="CURRENT_BALANCE_FC", precision=16, scale=2)
	private BigDecimal currentBalanceFc;

	@Column(name="CURRENT_BALANCE_LOCAL", precision=16, scale=2)
	private BigDecimal currentBalanceLocal;

	@Column(length=50)
	private String email;

	@Column(name="EMAIL_ADDRESS", length=300)
	private String emailAddress;

	@Column(length=50)
	private String fax;

	@Column(name="GROUP_OF_SUPPLIERS", length=2)
	private String groupOfSuppliers;

	@Column(name="LAST_UPD_BY")
	private String lastUpdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="LEAD_TIME", precision=6, scale=2)
	private BigDecimal leadTime;

	@Column(name="LOCAL_IMPORT", length=1)
	private String localImport;

	@Column(name="PAYMENT_TYPE", length=3)
	private String paymentType;

	@Column(name="PRIMARY_LANGUAGE", length=1)
	private String primaryLanguage;

	@Column(name="PROVINCE_CODE", length=2)
	private String provinceCode;

	@Column(name="REGION_CODE", length=2)
	private String regionCode;

	@Column(length=1)
	private String status;

	@Column(name="SUPPLIER_ADDRESS", length=500)
	private String supplierAddress;

	@Column(name="SUPPLIER_GROUP", length=2)
	private String supplierGroup;

	@Column(name="SUPPLIER_NAME_ENGLISH", length=300)
	private String supplierNameEnglish;

	@Column(name="SUPPLIER_NAME_THAI", length=300)
	private String supplierNameThai;

	@Column(name="SUPPLIER_TYPE")
	private String supplierType;

	@Column(name="SYNC_CREATEDBY", length=100)
	private String syncCreatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="SYNC_EXTERNAL_REF_KEY", length=100)
	private String syncExternalRefKey;

	@Column(name="SYNC_EXTERNAL_REF_NO", length=100)
	private String syncExternalRefNo;

	@Column(name="SYNC_ISSYNC", length=1)
	private String syncIssync;

	@Column(name="SYNC_UPDATEDBY", length=100)
	private String syncUpdatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	@Column(name="TAX_ID", length=30)
	private String taxId;

	@Column(name="TAX_TYPE", length=30)
	private String taxType;

	@Column(length=50)
	private String telephone;

	@Column(name="TUMBON_CODE", length=2)
	private String tumbonCode;

	@Column(name="TYPE_OF_SUPPLIER", length=2)
	private String typeOfSupplier;

	@Column(name="VAT_NAME_FLAG", length=1)
	private String vatNameFlag;

	@Column(name="WEB_ADDRESS", length=300)
	private String webAddress;

	@Column(name="WHT_NAME_FLAG", length=1)
	private String whtNameFlag;

	@Column(name="WHT_TYPE", length=2)
	private String whtType;

	@Column(name="YEAR_OPENING_BALANCE_FC", precision=16, scale=2)
	private BigDecimal yearOpeningBalanceFc;

	@Column(name="YEAR_OPENING_BALANCE_LOCAL", precision=16, scale=2)
	private BigDecimal yearOpeningBalanceLocal;

	@Column(length=6)
	private String zip;

    public SupplierMaster() {
    }

	public String getSupplierCode() {
		return this.supplierCode;
	}

	public void setSupplierCode(String supplierCode) {
		this.supplierCode = supplierCode;
	}

	public String getAltSupplierAddress() {
		return this.altSupplierAddress;
	}

	public void setAltSupplierAddress(String altSupplierAddress) {
		this.altSupplierAddress = altSupplierAddress;
	}

	public String getAmphurCode() {
		return this.amphurCode;
	}

	public void setAmphurCode(String amphurCode) {
		this.amphurCode = amphurCode;
	}

	public String getBranch() {
		return this.branch;
	}

	public void setBranch(String branch) {
		this.branch = branch;
	}

	public String getBranchAlternate() {
		return this.branchAlternate;
	}

	public void setBranchAlternate(String branchAlternate) {
		this.branchAlternate = branchAlternate;
	}

	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getContactPhoneNo() {
		return this.contactPhoneNo;
	}

	public void setContactPhoneNo(String contactPhoneNo) {
		this.contactPhoneNo = contactPhoneNo;
	}

	public String getContractPerson() {
		return this.contractPerson;
	}

	public void setContractPerson(String contractPerson) {
		this.contractPerson = contractPerson;
	}

	public String getCountry() {
		return this.country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public BigDecimal getCreditDays() {
		return this.creditDays;
	}

	public void setCreditDays(BigDecimal creditDays) {
		this.creditDays = creditDays;
	}

	public String getCurrency() {
		return this.currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public BigDecimal getCurrentBalanceFc() {
		return this.currentBalanceFc;
	}

	public void setCurrentBalanceFc(BigDecimal currentBalanceFc) {
		this.currentBalanceFc = currentBalanceFc;
	}

	public BigDecimal getCurrentBalanceLocal() {
		return this.currentBalanceLocal;
	}

	public void setCurrentBalanceLocal(BigDecimal currentBalanceLocal) {
		this.currentBalanceLocal = currentBalanceLocal;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getEmailAddress() {
		return this.emailAddress;
	}

	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	public String getFax() {
		return this.fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public String getGroupOfSuppliers() {
		return this.groupOfSuppliers;
	}

	public void setGroupOfSuppliers(String groupOfSuppliers) {
		this.groupOfSuppliers = groupOfSuppliers;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public BigDecimal getLeadTime() {
		return this.leadTime;
	}

	public void setLeadTime(BigDecimal leadTime) {
		this.leadTime = leadTime;
	}

	public String getLocalImport() {
		return this.localImport;
	}

	public void setLocalImport(String localImport) {
		this.localImport = localImport;
	}

	public String getPaymentType() {
		return this.paymentType;
	}

	public void setPaymentType(String paymentType) {
		this.paymentType = paymentType;
	}

	public String getPrimaryLanguage() {
		return this.primaryLanguage;
	}

	public void setPrimaryLanguage(String primaryLanguage) {
		this.primaryLanguage = primaryLanguage;
	}

	public String getProvinceCode() {
		return this.provinceCode;
	}

	public void setProvinceCode(String provinceCode) {
		this.provinceCode = provinceCode;
	}

	public String getRegionCode() {
		return this.regionCode;
	}

	public void setRegionCode(String regionCode) {
		this.regionCode = regionCode;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSupplierAddress() {
		return this.supplierAddress;
	}

	public void setSupplierAddress(String supplierAddress) {
		this.supplierAddress = supplierAddress;
	}

	public String getSupplierGroup() {
		return this.supplierGroup;
	}

	public void setSupplierGroup(String supplierGroup) {
		this.supplierGroup = supplierGroup;
	}

	public String getSupplierNameEnglish() {
		return this.supplierNameEnglish;
	}

	public void setSupplierNameEnglish(String supplierNameEnglish) {
		this.supplierNameEnglish = supplierNameEnglish;
	}

	public String getSupplierNameThai() {
		return this.supplierNameThai;
	}

	public void setSupplierNameThai(String supplierNameThai) {
		this.supplierNameThai = supplierNameThai;
	}

	public String getSupplierType() {
		return this.supplierType;
	}

	public void setSupplierType(String supplierType) {
		this.supplierType = supplierType;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncExternalRefKey() {
		return this.syncExternalRefKey;
	}

	public void setSyncExternalRefKey(String syncExternalRefKey) {
		this.syncExternalRefKey = syncExternalRefKey;
	}

	public String getSyncExternalRefNo() {
		return this.syncExternalRefNo;
	}

	public void setSyncExternalRefNo(String syncExternalRefNo) {
		this.syncExternalRefNo = syncExternalRefNo;
	}

	public String getSyncIssync() {
		return this.syncIssync;
	}

	public void setSyncIssync(String syncIssync) {
		this.syncIssync = syncIssync;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public String getTaxId() {
		return this.taxId;
	}

	public void setTaxId(String taxId) {
		this.taxId = taxId;
	}

	public String getTaxType() {
		return this.taxType;
	}

	public void setTaxType(String taxType) {
		this.taxType = taxType;
	}

	public String getTelephone() {
		return this.telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getTumbonCode() {
		return this.tumbonCode;
	}

	public void setTumbonCode(String tumbonCode) {
		this.tumbonCode = tumbonCode;
	}

	public String getTypeOfSupplier() {
		return this.typeOfSupplier;
	}

	public void setTypeOfSupplier(String typeOfSupplier) {
		this.typeOfSupplier = typeOfSupplier;
	}

	public String getVatNameFlag() {
		return this.vatNameFlag;
	}

	public void setVatNameFlag(String vatNameFlag) {
		this.vatNameFlag = vatNameFlag;
	}

	public String getWebAddress() {
		return this.webAddress;
	}

	public void setWebAddress(String webAddress) {
		this.webAddress = webAddress;
	}

	public String getWhtNameFlag() {
		return this.whtNameFlag;
	}

	public void setWhtNameFlag(String whtNameFlag) {
		this.whtNameFlag = whtNameFlag;
	}

	public String getWhtType() {
		return this.whtType;
	}

	public void setWhtType(String whtType) {
		this.whtType = whtType;
	}

	public BigDecimal getYearOpeningBalanceFc() {
		return this.yearOpeningBalanceFc;
	}

	public void setYearOpeningBalanceFc(BigDecimal yearOpeningBalanceFc) {
		this.yearOpeningBalanceFc = yearOpeningBalanceFc;
	}

	public BigDecimal getYearOpeningBalanceLocal() {
		return this.yearOpeningBalanceLocal;
	}

	public void setYearOpeningBalanceLocal(BigDecimal yearOpeningBalanceLocal) {
		this.yearOpeningBalanceLocal = yearOpeningBalanceLocal;
	}

	public String getZip() {
		return this.zip;
	}

	public void setZip(String zip) {
		this.zip = zip;
	}

}